home *** CD-ROM | disk | FTP | other *** search
- /* $Id: IShWF.h 1.8 1997/03/12 23:01:37 psq-pc Exp $ */
- #ifndef __ISHWF__
- #define __ISHWF__
-
- #ifndef __3DBSTYPE__
- #include "3DBSType.h"
- #endif
-
- #ifndef __RCOMPOBJ__
- #include "RCompObj.h"
- #endif
-
- DEFINE_GUID(IID_I3DShWireFrame, 0x5daccff0, 0x7edc, 0x11d0, 0xbf, 0x67, 0x0, 0xa0, 0xc9, 0xa, 0x7c, 0xb);
- DEFINE_GUID(IID_I3DExWireFrame, 0x5daccff1, 0x7edc, 0x11d0, 0xbf, 0x67, 0x0, 0xa0, 0xc9, 0xa, 0x7c, 0xb);
-
- enum {kWFNone=0x0, kWFSquareHandle=0x1, kWFRoundHandle=0x2, kWFEmptySquareHandle=0x3, kWFEmptyRoundHandle=0x4};
- enum {kWFShift=0x1, kWFCommand=0x2, kWFOption=0x4, kWFControl=0x8};
-
- struct WFPoint {
- short fType;
- VECTOR3D fLoc;
- VECTOR3D fScreenLoc;
- };
-
- struct WFConnection {
- long fFromPoint;
- long fToPoint;
- };
-
- struct WFData {
- short fNumPoints;
- short fNumConnections;
- WFPoint* fPoints;
- WFConnection* fConnections;
- };
-
- struct FacetMesh;
- struct I3DFacetCache;
- struct I3DShTreeElement;
-
- DECLARE_INTERFACE_(I3DShWireFrame, IUnknown) {
- STDMETHOD(GetWireFrame) (WFData& aWireFrame) PURE;
- STDMETHOD(GetFMesh) (FacetMesh& aMesh) PURE;
- STDMETHOD(SetFCache) (void *theView,I3DFacetCache *aFCache) PURE;
- STDMETHOD(GetFCache) (void *theView,I3DFacetCache *&aFCache) PURE;
- //-- Mesh
- STDMETHOD(AllocateFMesh) (long numFacets, long numVertices, long facetStreamSize) PURE;
- //-- WireFrame
- STDMETHOD(AllocateWireFrame) (short numPoints, short numConnections) PURE;
- STDMETHOD(Connect) (short point, short from, short to) PURE;
- STDMETHOD(SetPoint) (short point, short type, const VECTOR3D& loc) PURE;
- STDMETHOD(GetScreen2DBox) (BOX2D& box) PURE;
- STDMETHOD_(short, TestHit) (const VECTOR2D& point, NUM3D error) PURE;
- };
-
- struct TRACKINFO {
- VECTOR2D fScreenLoc;
- VECTOR3D fGlobalLoc;
- VECTOR3D fGlobalOrthoLoc ;
- VECTOR2D fHitLoc;
- VECTOR2D fHitOrthoLoc;
- VECTOR3D fLoc;
- VECTOR3D fOrthoLoc;
- VECTOR3D fRayDirection;
- VECTOR3D fRayStart;
- long fModifiers;
- };
-
- DECLARE_INTERFACE_(I3DExWireFrame, IUnknown) {
- STDMETHOD(TrackWireFrame) (I3DShWireFrame* wireFrame, short proj, I3DShTreeElement* tree, short handle, const TRACKINFO& startinfo, const TRACKINFO& previnfo, const TRACKINFO& nextinfo) PURE;
- STDMETHOD(DataToWireFrame) (I3DShWireFrame* wireFrame, short proj, I3DShTreeElement* tree) PURE;
- STDMETHOD(WireFrameToData) (I3DShWireFrame* wireFrame, short proj, I3DShTreeElement* tree) PURE;
- };
-
- #endif
-